using System.Runtime.Serialization;
using RentalOfCars.Domain.Entities;

namespace RentalOfCars.Infrastructure.Entities
{
    [DataContract]
    public class Client : IClient
    {
        public Client(int personId, string name, string lastName, string patronymic, string passport, string phone,
                      int clientId, IDiscount discount)
        {
            PersonId = personId;
            Name = name;
            LastName = lastName;
            Patronymic = patronymic;
            Passport = passport;
            Phone = phone;
            ClientId = clientId;
            Discount = discount;
        }

        #region IClient Members

        [DataMember]
        public int PersonId { get; private set; }

        [DataMember]
        public string Name { get; private set; }

        [DataMember]
        public string LastName { get; private set; }

        [DataMember]
        public string Login { get; private set; }

        [DataMember]
        public string Patronymic { get; private set; }

        [DataMember]
        public string Passport { get; private set; }

        [DataMember]
        public string Phone { get; private set; }

        [DataMember]
        public int ClientId { get; private set; }

        [DataMember]
        public IDiscount Discount { get; private set; }

        #endregion
    }
}